package view;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.KeyEvent;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.BevelBorder;

public class PanelCliente extends JPanel{
	
	private JComboBox jListCampoBusca = null;
	private JTextField jTextFieldBusca = null;
	private JButton jButtonAdicionar = null;
	private JLabel jLabel = null;
	private JTable jTable = null;
	private JMenu jMenu = null;
	private JButton jButtonAnterior = null;
	private JButton jButtonProximo = null;
	
	public PanelCliente(){
		super();
		initialize();
	}
	
	public JPanel getJPanelCliente() {
		return this;
	}
	
	private void initialize() {
		GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
		gridBagConstraints13.gridx = 2;
		gridBagConstraints13.insets = new Insets(0, 5, 2, 5);
		gridBagConstraints13.ipadx = 0;
		gridBagConstraints13.ipady = 0;
		gridBagConstraints13.anchor = GridBagConstraints.EAST;
		gridBagConstraints13.gridy = 4;
		GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
		gridBagConstraints12.gridx = 0;
		gridBagConstraints12.insets = new Insets(0, 5, 2, 5);
		gridBagConstraints12.anchor = GridBagConstraints.WEST;
		gridBagConstraints12.ipadx = 0;
		gridBagConstraints12.ipady = 0;
		gridBagConstraints12.weighty = 0.0D;
		gridBagConstraints12.gridwidth = 1;
		gridBagConstraints12.gridy = 4;
		GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
		gridBagConstraints11.gridx = 0;
		gridBagConstraints11.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints11.gridy = 0;
		GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
		gridBagConstraints10.fill = GridBagConstraints.BOTH;
		gridBagConstraints10.gridy = 3;
		gridBagConstraints10.weightx = 1.0;
		gridBagConstraints10.weighty = 1.0;
		gridBagConstraints10.anchor = GridBagConstraints.CENTER;
		gridBagConstraints10.gridwidth = 3;
		gridBagConstraints10.insets = new Insets(5, 5, 5, 5);
		gridBagConstraints10.ipady = 250;
		gridBagConstraints10.gridheight = 1;
		gridBagConstraints10.ipadx = 500;
		gridBagConstraints10.gridx = 0;
		GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
		gridBagConstraints9.gridx = 2;
		gridBagConstraints9.anchor = GridBagConstraints.NORTH;
		gridBagConstraints9.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints9.insets = new Insets(5, 5, 5, 5);
		gridBagConstraints9.ipadx = 40;
		gridBagConstraints9.ipady = 40;
		gridBagConstraints9.gridy = 1;
		jLabel = new JLabel();
		jLabel.setText("Fotinha");
		GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
		gridBagConstraints8.gridx = 2;
		gridBagConstraints8.ipadx = 20;
		gridBagConstraints8.ipady = 0;
		gridBagConstraints8.anchor = GridBagConstraints.NORTH;
		gridBagConstraints8.insets = new Insets(5, 5, 5, 5);
		gridBagConstraints8.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints8.gridy = 2;
		GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
		gridBagConstraints7.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints7.gridy = 1;
		gridBagConstraints7.weightx = 1.0;
		gridBagConstraints7.anchor = GridBagConstraints.SOUTH;
		gridBagConstraints7.insets = new Insets(5, 5, 5, 70);
		gridBagConstraints7.ipadx = 130;
		gridBagConstraints7.gridx = 1;
		GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
		gridBagConstraints6.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints6.gridy = 1;
		gridBagConstraints6.weightx = 1.0;
		gridBagConstraints6.weighty = 1.0;
		gridBagConstraints6.ipadx = 0;
		gridBagConstraints6.ipady = 18;
		gridBagConstraints6.insets = new Insets(5, 40, 5, 5);
		gridBagConstraints6.anchor = GridBagConstraints.SOUTHEAST;
		gridBagConstraints6.gridx = 0;
		
		setLayout(new GridBagLayout());
		setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
		add(getJListCampoBusca(), gridBagConstraints6);
		add(getJTextFieldBusca(), gridBagConstraints7);
		add(getJButtonAdicionar(), gridBagConstraints8);
		add(jLabel, gridBagConstraints9);
		add(getJTable(), gridBagConstraints10);
		add(getJMenu(), gridBagConstraints11);
		add(getJButtonAnterior(), gridBagConstraints12);
		add(getJButtonProximo(), gridBagConstraints13);
		
	}
	
	public JComboBox getJListCampoBusca() {
		if (jListCampoBusca == null) {
			jListCampoBusca = new JComboBox();
		}
		return jListCampoBusca;
	}
	
	public JTextField getJTextFieldBusca() {
		if (jTextFieldBusca == null) {
			jTextFieldBusca = new JTextField();
		}
		return jTextFieldBusca;
	}

	/**
	 * This method initializes jButton5	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getJButtonAdicionar() {
		if (jButtonAdicionar == null) {
			jButtonAdicionar = new JButton();
			jButtonAdicionar.setText("Adicionar");
		}
		return jButtonAdicionar;
	}

	/**
	 * This method initializes jTable	
	 * 	
	 * @return javax.swing.JTable	
	 */
	public JTable getJTable() {
		if (jTable == null) {
			jTable = new JTable();
			jTable.setPreferredSize(new Dimension(450, 80));
		}
		return jTable;
	}

	/**
	 * This method initializes jMenu	
	 * 	
	 * @return javax.swing.JMenu	
	 */
	public JMenu getJMenu() {
		if (jMenu == null) {
			jMenu = new JMenu();
		}
		return jMenu;
	}

	/**
	 * This method initializes jButtonAnterior	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getJButtonAnterior() {
		if (jButtonAnterior == null) {
			jButtonAnterior = new JButton();
			jButtonAnterior.setText("<< anterior");
			jButtonAnterior.setMnemonic(KeyEvent.VK_UNDEFINED);
			jButtonAnterior.setSize(new Dimension(110, 20));
		}
		return jButtonAnterior;
	}

	/**
	 * This method initializes jButtonProximo	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getJButtonProximo() {
		if (jButtonProximo == null) {
			jButtonProximo = new JButton();
			jButtonProximo.setText("próximo >>");
			jButtonProximo.setSize(new Dimension(110, 20));
		}
		return jButtonProximo;
	}
	
}
